<h1>Patrimonios Asignados a  <%= @cultural_heritage_cultural_heritage.name %></h1>
<% if flash[:notice] %>
    <div id="notice"><%= flash[:notice] %></div>
<% end %>
<fieldset id="agrupacion">
  <legend>Datos</legend>
<% if  !@cultural_heritage_cultural_heritage.nationalRegistrationCode.blank?%>
<div class="field">
    <b>Código de Registro Nacional:</b>
    <%= @cultural_heritage_cultural_heritage.nationalRegistrationCode %>
</div>
<%end%>
<% if  !@cultural_heritage_cultural_heritage.description.blank?%>
<div class="field">
    <b>Descripción:</b>
    <%= @cultural_heritage_cultural_heritage.description %>
</div>
<%end%>
<% if  !@cultural_heritage_cultural_heritage.group.blank?%>
<div class="field">
    <b>Grupo:</b>
    <%= @cultural_heritage_cultural_heritage.obj_group.name %>
</div>
<%end%>
</fieldset>
<br/>
<fieldset id="agrupacion">
  <legend>Búsqueda</legend>
<!-- Empieza formulario de busqueda -->
<% form_tag url_for(:action=>"update_assing_table"),{:id =>"cultural_heritage_properties_assing_form_search"} do -%>
    
  <fieldset class="column-left">
    <p class="two-col"><label>Buscar</label><%= text_field_tag "search_name" %></p>
    <p><label>Institución cultural</label>
      <%= collection_select(:cultural_institution, :id, @cultural_institutions, :id, :name, options ={:prompt => "Seleccione"}, :class => "combobox") %></p>
    <p><label>Desde:</label><%= datepicker_input "calendar", "start_date" %></p>
    <p><label>Hasta:</label><%= datepicker_input "calendar", "end_date" %></p>
    <p><label>Cultura</label>
        <%= select_tag "search_culture", options_for_select(@cultures.collect {|t| [t.name, t.id]}),:include_blank=>"Seleccione", :class => "combobox" %></p>
  </fieldset>
  <fieldset class="column-right">
    <p><label>Tipologia</label><%= select_tag "search_tipology", options_for_select(@tipologies.collect {|t| [t.name, t.id]}),:include_blank=>"Seleccione" , :class => "combobox"%></p>
    <p><label>Estado</label><%= select_tag "search_state", options_for_select(@states.collect {|t| [t.name, t.id]}),:include_blank=>"Seleccione" , :class => "combobox"%></p>
    <p><label>Grupos</label><%= select_tag "search_group", options_for_select(@groups.collect {|t| [t.name, t.id]}),:include_blank=>"Seleccione" %></p>
    <p><label>Subgrupo</label><%= select_tag "search_subgroup", options_for_select(@subgroups.collect {|t| [t.name, t.id]}),:include_blank=>"Seleccione" %> </p>
    <p><label>Periodo</label>
        <%= select_tag "search_period", options_for_select(@periods.collect {|t| [t.name, t.id]}),:include_blank=>"Seleccione", :class => "combobox" %></p>
  </fieldset>
  <%=hidden_field_tag "cultural_heritage_id",@cultural_heritage_cultural_heritage.id%>
  
  <input class="column-right" name="Buscar" value="Buscar" id="cultures_search" type="submit" />
<% end %>
</fieldset>
<div id="lineaform"></div>

<!-- Tabla -->
<div id="cultural_heritage_assing_table">
<%= render :partial=>"assing_table" %>
</div>
<!-- Lista de asignaciones -->
<div id="cultural_heritage_assing_list">
<%= render :partial=>"assing_list" %>
</div>
<br/>
<div id="lineaform"></div>
<fieldset>
  <%= link_to 'Mostrar', :controller=>"/cultural_heritage/cultural_heritage_properties", :action=>"show", :id=>@cultural_heritage_cultural_heritage.id %> | 
  <%= link_to 'Menu',{:controller=>"/cultural_heritage/cultural_heritage_properties",:action => 'index'}%>
</fieldset>